package com.ztatic.fightmode.views;

import com.ztatic.fightmode.R;
import com.ztatic.fightmode.views.drawables.BitmapButton;

import android.content.Context;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Point;
import android.view.MotionEvent;

public class MainmenuScreen extends Screen{

	BitmapButton _button = new BitmapButton();
	
	public MainmenuScreen(Context context) {
		super(context);
		
		//init button
		_button.setActiveImage(BitmapFactory.decodeResource(getResources(), R.drawable.button_test_active));
		_button.setInactiveImage(BitmapFactory.decodeResource(getResources(), R.drawable.button_test_inactive));
		_button.setClickedImage(BitmapFactory.decodeResource(getResources(), R.drawable.button_test_clicked));
		_button.setSize(new Point(64, 64));
		_button.setPosition(new Point(50, 50));
	}
	
	@Override
	public boolean onTouchEvent(MotionEvent event)
	{
		_button.handlePositionEvent(event);
		
		return true;
	}
	
	@Override
	public void onDraw(Canvas c)
	{
		
		_button.onDraw(c);
	}

}
